package com.jack.xiaoer.service;

import com.jack.xiaoer.dto.CartDTO;
import com.jack.xiaoer.dto.OrderDTO;
import com.jack.xiaoer.dto.OrderDetailDTO;
import com.jack.xiaoer.entity.Order;

import java.util.List;
import java.util.Optional;

/**
 * Created by Jackaroo Zhang on 2018/12/19.
 */
public interface OrderService {

    Order create(Optional<OrderDTO> orderDTOOptional);

    Order update(Optional<Order> orderOptional);

    OrderDetailDTO getOrderDetail(Long orderId);

    List<Order> listByUserIdAndState(Long userId, Integer stateCode);

    List<Order> listByShopIdAndState(Long shopId, Integer stateCode);

}
